#ifndef GLOBALS_H
#define GLOBALS_H
#include <list>
#include <vector>
#include <map>
#include <string>
//#include "configurator.h"
#define USE_OPENEXR
#include "rtcore/rtcore.h"

namespace gemren
{
	typedef ::size_t size_t;
	typedef float float_type;
	typedef embree::Vec3f coord;
	typedef embree::Vec2f coord2d;
	const float EPSILON = 3e-5f;
	const float PI = 3.141592654f; 
	void ensure_scheduler_init();


	class shader;
	class scene;
	struct triangle;
	class light_source;
	class material;
	typedef shader* shader_ptr;
	typedef material* material_ptr;
	typedef std::map<std::string, material*> material_cont;
	typedef std::list<shader*> shader_cont;
	typedef std::list<light_source*> light_source_cont; //pointer bc of polymorphism
	typedef light_source_cont::const_iterator light_ptr;
	
	enum err_t { 
		ERR_OK_RESET_CAUSTICS = -2,
		ERR_OK_NOSCRATCH = -1, 
		ERR_OK = 0, 
		ERR_BAD_CHILD = 1, 
		ERR_BAD_PROP = 2, 
		ERR_BAD_VAL = 3 
	}; 
	enum lighting_modes 
	{
		LM_NONE = 0x0,
		LM_PRIMARY = 0xF,
		LM_PRIMARY_LIGHTSOURCE = 0x1, 
		LM_PRIMARY_BRDF = 0x2, 
		LM_PRIMARY_MIS = 0x4,
		
		LM_CAUSTIC = 0xF0,
		LM_CAUSTIC_LIGHTSOURCE = 0x10, 
		LM_CAUSTIC_BRDF = 0x20, 
		LM_CAUSTIC_MIS = 0x40
	};
}
#endif